<?php
    //TODO Autenticate or secure
    //TODO Validate parameters

    if (empty($_GET['action'])) {
        $_GET['action'] = 'get';
    }
    
    switch(strtolower($_GET['action'])){
       case 'get':
           
           break;
       case 'save':
           /**
            * Format
            * {
            *    id: int
            *    name: string
            *    title: string
            *    template: int
            *    charactere: [
            *       {
            *           id: integer,
            * 
            *           actorUser: string, 
            *           actorType: [facebook|meme]
            *           actorFullname: string,
            *           actorImage: string, 
            *           
            *           characterName: string
            *       },
            *       ...
            *    ]
            *    scenes: [
            *       {
            *           charactereId: integer,
            *           text: string
            *       },
            *       ...
            *    ]
            * }
            */
           var_dump($_GET['dread']);
           
           break;
       case 'delete':
           
           break;
       case 'publish':
           
           break;
       
       case 'meme':
           
           break;
       
    }
    
    